Agent-neutral guidance, and a single root resolver for paths - #13
Merged
Conversation
Guidance lived only in .github/copilot-instructions.md, which named one agent. AGENTS.md is now the canonical file, with CLAUDE.md and the copilot instructions as pointers to it. _find_root walked up for a marker file, which stops at a git worktree — so data would resolve into the worktree rather than the checkout everyone shares. The root is now resolved from git (--git-common-dir names the main checkout from anywhere), with the marker walk as the fallback for a non-git install. DatasetPaths becomes a plain field dataclass over a small base that supplies create(), built by expanding DATASET_DIRS, so a subfolder name is written once. EXAMPLE_DATASET is dropped: FilePaths.dataset() is the single way to reach a dataset. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VYsKhgGuNCFtxqFhSLGtCK
Datasets were reached by a method call returning a dataclass while figures were a plain
attribute, so the two looked nothing alike. The one repo that has used this layout for years
(gli3_merscope_analysis) reaches every dataset as a flat constant and treats
{raw,processed,resources,results} as a documented convention, which has held up fine.
FilePaths is now attributes only, all of them Paths. DatasetPaths and the shared _Dirs base
are gone; the layout convention is stated in AGENTS.md instead.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VYsKhgGuNCFtxqFhSLGtCK
It still called the dataset() accessor removed in the previous commit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VYsKhgGuNCFtxqFhSLGtCK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Housekeeping only. The analysis-task conventions that #12 proposed are not here — those
need to be tried in a real analysis repo before they are baked into the template.
Agent-neutral guidance. Repo guidance lived only in
.github/copilot-instructions.md,which names one agent.
AGENTS.mdis now the canonical file;CLAUDE.mdand the copilotinstructions are pointers to it. Content is what was already there — layout, paths,
environments, commands — plus a short paths section.
One root resolver.
_find_rootwalked up forpixi.toml/.git, which stops at a gitworktree (a worktree's
.gitis a file, but it exists). Data would then resolve into theworktree instead of the checkout everyone shares. The root now comes from
git rev-parse --git-common-dir, which names the main checkout from anywhere, with themarker walk kept as the fallback for a non-git install.
Dataset paths as a set.
DatasetPathswas properties + a hand-writtencreate()loop;it is now a field dataclass over a small
_Dirsbase that suppliescreate(), built byexpanding
DATASET_DIRS— so a subfolder name is written once.EXAMPLE_DATASETis droppedin favour of
FilePaths.dataset("example_dataset"), so there is one way to reach a dataset._Dirsis deliberately the extension point: a future task-path type is the same shape withdifferent roots, once we know from practice that the shape is right.
Tests pass; the demo notebook is updated.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VYsKhgGuNCFtxqFhSLGtCK